package interview.huawei.tjt.training.huaweijishitiku;

import java.util.Scanner;

// 句子逆序
public class HJ13 {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        while ( sc.hasNextLine() ) {
            String str = sc.nextLine();
            String[] s = str.split(" ");
            for ( int i = s.length - 1; i >= 0 ; i-- ) {
                if ( i != 0 ) {
                    System.out.print(s[i] + " ");
                } else {
                    System.out.print(s[i]);
                }

            }
        }

    }

}
